
/**
** \file       exec_command.c
**
** \brief      this function execute command rule
**
** \author     Ben M'rad Hanna, Laterem Hamza, Boillot Ulysse, De Olivera
**             Guillaume and Nguyen Viet Dung
**
** \version    0.8
**
** \date       23 Novembre 2010
**
*/

#include "execution.h"

int     exec_command(s_command          *node)
{
  if (node->smp_cmd != NULL)
    return (exec_smpcmd(node->smp_cmd));

  if (node->sh_cmd != NULL)
    return (exec_shcmd(node->sh_cmd));

  if (node->funcdec != NULL)
    return (exec_funcdec(node->funcdec));

  return (1);
}
